﻿using System;
using GeoAPI.Geometries;

namespace NetTopologySuite.Geometries.Prepared
{
	internal class PreparedPolygonCovers : AbstractPreparedPolygonContains
	{
		public static bool Covers(PreparedPolygon prep, IGeometry geom)
		{
			return new PreparedPolygonCovers(prep).Covers(geom);
		}

		public PreparedPolygonCovers(PreparedPolygon prepPoly) : base(prepPoly)
		{
			this.RequireSomePointInInterior = false;
		}

		public bool Covers(IGeometry geom)
		{
			return base.Eval(geom);
		}

		protected override bool FullTopologicalPredicate(IGeometry geom)
		{
			return this.prepPoly.Geometry.Covers(geom);
		}
	}
}
